%y: computed probability mass function on interval [0, 300]
%x: donation data
% round x to have integers
% match to each observation the pmf computed at that integer;
function probmass=estimpmf(y, x);
     n=length(x); 
     probmass=zeros(n,1);
        x=round(x);

   for i=1:n;
       probmass(i,1)=y(x(i,1)+1,1); % +1 because y density from 0 to 300 so 0 is first element of vector. 
   end
end